<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>角色管理</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- 项目基准路径 -->
<base href="/bestinc/" />

<!-- 引入layui的css -->
<link rel="stylesheet" href="static/lib/layui/css/layui.css" media="all">

<!-- 引入自定义工具css -->
<link rel="stylesheet" href="static/css/util.css" media="all">

<!-- 引入jqeury -->
<!-- <script src="js/util/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script> -->

<!-- 引入layui的js -->
<script src="static/lib/layui/layui.js" type="text/javascript"
	charset="utf-8"></script>

<!-- 引入资源js -->
<script src="static/js/system/role/role.js" type="text/javascript"
	charset="utf-8"></script>
	
</head>
<body>
	<div id="content">
		<!-- 头部搜索框 -->
		<div id="search-header">
			<form class="layui-form">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">角色名</label>
						<div class="layui-input-inline">
							<input id="roleName" type="text" name="roleName"
								placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">组织类型</label>
						<div class="layui-input-inline">
							<!--  <input id="subsetName" type="text" name="subsetName" placeholder="请输入" autocomplete="off" class="layui-input">	 -->
							<select id="sbName" name="subsetName">
								<option value=""></option>

							</select>
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">是否可用</label>
						<div class="layui-input-inline">
							<select id="useable" name="useable"
								class="selectpicker show-tick form-control">
								<option value=""></option>
								<option value="Y">是</option>
								<option value="N">否</option>
							</select>
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label"></label>
						<div class="layui-input-inline">
							<button class="layui-btn" lay-submit=""
								lay-filter="roleSearchBtn">
								<i class="layui-icon layui-icon-search"></i> 查询
							</button>
							<button id="reset" class="layui-btn" type="reset">
								<i class="layui-icon layui-icon-refresh"></i> 重置
							</button>
						</div>
					</div>
				</div>
			</form>
		</div>

		<div id="dataDiv">
			<!-- 数据表格 -->
			<table class="layui-hide" id="roleTable" lay-filter="roleTableEvent"></table>
		</div>

		<!-- 添加模态框 -->
		<div id="addRoleModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="addRoleForm" lay-filter="addRoleForm" class="layui-form"
				action="">
				<div class="layui-form-item">
					<label class="layui-form-label">角色名</label>
					<div class="layui-input-block">
						<input type="text" name="roleName" lay-verify="required" my-verify="addRoleName"
							placeholder="请输入角色名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">组织类型</label>
					<div class="layui-input-block">
						<!-- <input type="text" name="subsetName" lay-verify="required"  placeholder="请输入组织类型" autocomplete="off" class="layui-input"> -->
						<select id="addSubsetbName" name="subsetName">
							<option value=""></option>

						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">描述</label>
					<div class="layui-input-block">
						<input type="text" name="description" lay-verify="aihao"
							placeholder="请输入描述" autocomplete="off" class="layui-input">
					</div>
				</div>

				<!-- <div class="layui-form-item">
					<div class="layui-input-block">
						<button type="submit" class="layui-btn" lay-submit=""
							lay-filter="addRoleBtn">立即提交</button>
						<button type="button" class="layui-btn modalClose">关闭</button>
					</div>
				</div> -->
			</form>
		</div>

		<!-- 修改模态框 -->
		<div id="updateRoleModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="updateRoleForm" lay-filter="updateRoleForm"
				class="layui-form" action="">
				<input type="hidden" name="_method" value="PUT" /> <input
					type="hidden" name="roleId" />
				<div class="layui-form-item">
					<label class="layui-form-label">角色名</label>
					<div class="layui-input-block">
						<input type="text" name="roleName" lay-verify="aihao" my-verify="updateRoleName"
							placeholder="请输入角色名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">组织类型</label>
					<div class="layui-input-block">
						<!-- <input type="text" name="subsetName" lay-verify="aihao"  placeholder="请输入组织类型" autocomplete="off" class="layui-input"> -->
						<select id="updateSubsetbName" name="subsetName">
							<option value=""></option>

						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">描述</label>
					<div class="layui-input-block">
						<input type="text" name="description" lay-verify="aihao"
							placeholder="请输入描述" autocomplete="off" class="layui-input">
					</div>
				</div>
				<!-- <div class="layui-form-item">
					<div class="layui-input-block">
						<button type="submit" class="layui-btn" lay-submit=""
							lay-filter="updateRoleBtn">立即提交</button>
						<button type="button" class="layui-btn modalClose">关闭</button>
					</div>
				</div> -->
			</form>
		</div>

		<!-- 头部工具栏 -->
		<script type="text/html" id="roleToolbar">
  			<div class="layui-btn-group">
				<span class="btnCont" style="display: none;">
 					<button title="添加" lay-event="addRole" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe654;</i>增加</button>
					<button title="修改" lay-event="updateRole" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe642</i>修改</button>
    				<button title="修改" lay-event="frozenRole" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe640;</i>冻结</button>
					<button title="修改" lay-event="recoverRole" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe669;</i>还原</button>
				</span>
  			</div>
		</script>

		<!-- 状态 -->
		<script type="text/html" id="checkboxTpl">
    		<span {{d.useable=='Y'? 'class="useable font-color font-size my-bg-green"': 'class="useable font-color font-size my-bg-red"'}}>{{d.useable=='Y'?'可用':'禁用'}}</span>
		</script>

		<!-- 工具栏列 -->
		<script type="text/html" id="roleBar">
  			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
		</script>

	</div>
	<!-- 引入按钮权限控制js -->
	<script src="static/js/system/power/authorityControl.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
